#ifndef _CLK_H
#define _CLK_H

#include <device.h>
#include <arch/cpu/soc/clk.h>

#ifdef __TOP_HALF__ 
struct clk *clk_get_by_id(unsigned int id);
#endif

struct clk *clk_get(const char *name);
void clk_put(struct clk *clk);
int clk_enable(struct clk *clk);
int clk_disable(struct clk *clk);
unsigned int clk_get_rate(struct clk *clk);
unsigned int clk_round_rate(struct clk *clk, unsigned int rate);
int clk_set_rate(struct clk *clk, unsigned int rate);
int clk_set_parent(struct clk *clk, struct clk *parent);
struct clk *clk_get_parent(struct clk *clk);
struct clk *clk_get_by_device(struct device *dev);

#endif /* _CLK_H */

